.beambox-studio {
    svg:not(:root) {
        overflow: visible;
    }
    #svg_editor:not(.color) #svgcontent{
        filter: saturate(0%);
    }
    user-select: none;
    padding: 5px;
    .left-panel {
        margin: 0 0 0 30px;
        z-index: 1;
        position: relative;
        margin-top: calc(50vh - 125px);
        display: inline-flex;
        flex-direction: column;
        .option {
            width: 140px;
            padding: 10px 6px;
            color: #888;
            font-size: 1.7rem;
            cursor: pointer;
            &:hover {
                background: #888;
                color: #E0E0DF;
            }
            &.preview-btn {
                display: inline-block;
                width: auto;
                &.preview-mode-on {
                    background: #444;
                    color: #E0E0DF;
                }
            }
        }
        .clear-preview {
            cursor: pointer;
            position: relative;
            left: 5px;
            color: #888;
            &:hover {
                cursor: pointer;
                color: #333;
                font-size: bold;
            }
        }
        .advanced-panel {
            border-radius: 2px;
            background-color: #fff;
            box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
            width: 440px;
            padding: 0px;
            .main-content {
                padding: 20px;
                .title {
                    color: #626262;
                    font-size: 15px;
                    font-weight: 500;
                    letter-spacing: 0.5px;
                    margin-bottom: 15px;
                }
                .control {
                    display: flex;
                    align-items: center;
                    .label {
                        width: 120px;
                    }
                    .slider {
                        width: 150px;
                    }
                    .value {
                        margin-left: 10px;
                    }
                    .switch-container {
                        margin-left: 0;
                    }
                }
            }

            .footer {
                height: 59px;
                padding-top: 12px;
                padding-bottom: 12px;
                margin-bottom: 0px;
                border-top: 1px solid #DDD;
                .btn {
                    margin-left: 12px;
                    margin-right: 0px;
                    line-height: 30px;
                    &:first-of-type {
                        margin-right: 12px;
                    }
                }
            }
        }
        .ui-dialog-menu-item {
            .dialog-label {
                width: 140px;
                border-radius: 1px;
                transition: all .1s ease;
                min-width: auto;
                div {
                    pointer-events: visible;
                }

            }

            .dialog-window {
                pointer-events: visible;
                .slider {
                    width: 110px;
                    padding-left: 10px;
                    padding-right: 10px;
                }
            }
        }
        #overview_window_content {
            border-radius: 2px;
            opacity: 0.8;
            transition: opacity 0.3s;
            &:hover {
                opacity: 1;
            }
        }
    }
    .object-panels {
        display: absolute;
        box-shadow: 0px 3px 5px rgba(0,0,0,0.15);
        border-radius: 2px;
        transition: left .1s ease, top .1s ease, opacity .1s ease;
        &.unselectable {
            opacity: 0.5;
            user-select: none;
            pointer-events: none;
        }
        .object-panel {
            @include flexbox();
            font-size: 20px;
            transition: all .1s ease;
            z-index: 1;
            will-change: top, left, transform;
            .accordion-body {
                overflow: visible;
                position: relative;
                .ui.ui-control-unit-input-v2 {
                    .unit {
                        font-size: 10px;
                        margin-left: -30px;
                    }
                    input[disabled] {
                        background-color: #f2f2f2;
                        cursor: not-allowed;
                    }
                }
                &.with-lock {
                    display: flex;
                    >div {
                        display: inline-block;
                    }
                    .lock {
                        padding-bottom: 7px;
                        color: #999;
                        margin-left: 10px;
                        label {
                            font-size: 27px;
                            cursor: pointer;
                            &:hover {
                                color: black;
                            }
                            i {
                                margin-left: 5px;
                                transform: scale(-1, 1);
                                &.locked {
                                    color: #444;
                                }
                                &.unlocked {
                                    color: #dddddd;
                                }
                            }
                        }
                    }
                    .ui.ui-control-unit-input-v2 {
                        input {
                            width: 100px;
                        }
                    }
                }
                .shading-checkbox {
                    color: #666;
                    margin-left: 17px;
                    font-size: 22px;
                    cursor: pointer;
                }
            }
            .caption {
                margin: 0;
            }
            .accordion .caption .value {
                color: #999;
            }
            .controls {
                background: #FFFFFF;
                display: block;
                margin: 0;
                padding: 0 20px;
                width: 240px;
                border: 1px #ddd solid;
                .control {
                    .text-center.header {
                        color: #999;
                    }
                    font-size: 20px;
                    margin: 0 0 10px 0;
                    .input-fullsize {
                        margin: 0;
                        width: 100%;
                    }
                    .input-halfsize {
                        display: inline-block;
                        width: 45%;
                        input {
                            width: 80%;
                        }
                    }
                    >div {
                        margin-right: unset;
                    }
                    input[type=range] {
                        border: unset;
                        cursor: pointer;
                    }
                }
            }
            .caption {
                @include flexbox();
                color: $primaryColor;
                font-size: 12px;
                line-height: 30px;
                justify-content: space-between;
            }
            &.text-panel {
                .controls {
                    padding-bottom: 10px;
                    .control {
                        margin-bottom: 0;
                        .fill-checkbox {
                            color: #666;
                            margin-left: 17px;
                            font-size: 22px;
                            cursor: pointer;
                        }
                    }
                }
            }
        }
    }
    #svg_editor {
        color: #000;
        #workarea {
            border: none;
            top: 105px;
            left: 15px;
            right: 0px;
            bottom: 0px;
            #svgcanvas {
                background: $backgroundColor;
            }
        }
        #sidepanels {
            border: none;
            position: absolute;
            width: 153px;
            padding-left: 10px;
            padding-right: 10px;
            opacity: 0.8;
            z-index: 2;
            top: 110px;
            right: 9px;
            transition: opacity 0.3s;
            &:hover {
                opacity: 1;
                z-index: 4;
            }
            #layerpanel {
                background-color: $backgroundColor;
                display: block;
                overflow: initial;
                border: 1px #444 solid;
                border-radius: 2px;
                // box-shadow: 4px 5px 14px #444;

                #layerbuttons {
                    padding: 0;
                    width: 100%;
                    border: none;
                    .layer_button {
                        padding: 3px 0;
                        &:hover {
                            background-color: #808080;
                            color: white;
                            cursor: pointer;
                        }
                    }
                }
                #layerlist {
                    width: 100%;
                    .layercolor div{
                        position: relative;
                        top: 2px;
                        border: 1px solid black;
                        background: black;
                        width: 14px;
                        height: 14px;
                        margin-left: 5px;
                        display: inline-block;
                    }
                    .layervis {
                        text-align: center;
                    }
                    tr.layer {
                        .layername {
                            padding: 3px 0px;
                        }
                        &.layersel, &.layersel:hover {
                            color: white;
                            background-color: #444;
                            font-weight: normal;
                        }

                        &.mark, &.mark:hover {
                            color: white;
                            border: 1px solid #666 !important;
                            background-color: #666 !important;
                            font-weight: normal;
                        }

                        &:hover {
                            color: black;
                            background-color: #ddd;

                        }
                        &:not(.layersel):first-child {
                            &:hover {
                                border-top: 1px #999 solid;
                            }
                            border-top: 1px white solid;
                        }
                    }
                }

            }
            #sidepanel_handle {
                @include force-hide();
            }
        }
        .selLayerBlock {
            margin-top: 18px;
            margin-bottom: 15px;
            #selLayerNames {
                width: 100%;
                background-color: #444;
                color: #ddd;
                padding: 3px 3px 3px 13px;
                cursor: pointer;
            }
        }
        #layer-laser-panel-placeholder {
            background-color: $backgroundColor;
            min-height: 200px;
            margin-top: 20px;
            border: 1px #444 solid;
            border-radius: 2px;
            .layername {
                margin-bottom: 10px;
                border-bottom: 1px #444 solid;
                padding: 2px;
                text-align: center;
            }
            .panel {
                padding-left: 10px;
            }
            .ui.ui-control-unit-input-v2 {
                margin-bottom: 7px;
                .unit {
                    margin-left: -40px;
                    font-size: 10px;
                }
                input {
                    outline: none;
                    border: 1px #333 solid;
                    width: 90%;
                    padding: 3px 0px 3px 12px;
                }
            }

            .controls {
                overflow: hidden;

                .control {
                    line-height: 0;
                }
                .label {
                    font-size: 10pt;
                    color: #000;
                    line-height: 16px;
                    padding-left: 10px;
                }
                .dropdown-container {
                    position: relative;
                    top: 0;
                    left: 0;

                    :focus {
                        outline: none;
                    }

                    select {
                        background-color: #fff;
                        height: 24px;
                        font-size: 9pt;
                        color: #000;
                        width: 110px;
                        padding-left: 5px;
                        margin-left: 10px;
                        margin-top: 0;
                        margin-bottom: 7px;
                        border: 1px #333 solid;
                    }
                }

                .first-child-selected {
                    select {
                        background-image: url("../img/icon-3d-arrow-down.png");
                        background-position: calc(100% - 4px) center;
                        background-repeat: no-repeat;
                        background-size: 8px 8px;
                    }
                }
            }

            .more-config-panel {
                box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
                border-radius: 2px;
                background: #FFF;
                padding: 20px 20px 0;
                width: 440px;

                .title {
                    color: #626262;
                    font-size: 15px;
                    font-weight: 600;
                    line-height: 18px;
                }

                .config-list {
                    border: 2px solid #E0E0DF;
                    height: 110px;
                    margin-top: 20px;
                    overflow-y: auto;
                    width: 100%;

                    .config-entry {
                        border-bottom: 1px solid #E0E0DF;
                        color: $primaryColor;
                        cursor: pointer;
                        height: 40px;
                        line-height: 40px;

                        span {
                            margin-left: 10px;
                        }
                    }
                    .selected {
                        background-color: #E0E0E0;
                        color: #555;
                    }
                }

                .controls {
                    padding: 20px 0;

                    .control {
                        color: #888;
                        display: flex;
                        font-size: 13px;
                        height: 40px;
                        align-items: center;
                        justify-content: space-around;

                        .label {
                            font-size: 11px;
                            text-transform: uppercase;
                            color: #888;
                            line-height: 1em;
                            width: 100px;
                            align-self: center;
                        }

                        .value-text {
                            width: 120px;
                            margin: 5px 0 5px 5px;
                            padding: 0 5px;

                            &::after {
                                content: attr(data-tail);
                            }
                        }
                    }
                }

                .form {
                    margin: 0 0 10px 0;
                }

                .footer {
                    border: none;
                    border-top: 1px solid #ccc;
                    position: static;
                    border-bottom-left-radius: 2px;
                    border-bottom-right-radius: 2px;

                    div {
                        line-height: 10px;
                    }

                    .right {
                        float: right;
                        padding: 4% 0;
                    }

                    .left {
                        float: left;
                        padding: 4% 0;
                    }

                    .btn {
                        border-radius: 0;
                        font-size: 15px;
                        line-height: 30px;
                        margin: 0;
                        &:hover {
                            border: 2px solid #424242;
                            color: #424242;
                        }
                    }

                    .btn:first-child {
                        margin: 0 10px 0 0;
                    }
                }
            }

            .save-config-panel {
                box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
                border-radius: 2px;
                background: #FFF;
                padding: 20px 20px 0;
                width: 440px;

                .title {
                    color: #626262;
                    font-size: 15px;
                    font-weight: 600;
                    line-height: 18px;
                }

                .name {
                    color: #909090;
                    font-size: 16px;
                    height: 40px;
                    line-height: 40px;
                    margin-top: 20px;
                    margin-bottom: 20px;
                    display: flex;

                    span {
                        flex: 1;
                    }

                    input {
                        border: 2px solid #ccc;
                        flex: 2;
                        padding: 3px;
                        margin-left: 30px;
                    }
                }

                .form {
                    margin: 0 0 10px 0;
                }

                .footer {
                    padding: 10px 0;
                    border: none;
                    border-top: 1px solid #ccc;
                    position: static;

                    .btn {
                        margin: 0;
                        min-width: 40px;
                        line-height: 30px;
                        flex: initial;

                        &.btn-apply {
                            margin: 0;
                        }
                    }
                }
            }

            .custom-presets-wrapper {
                background: #FFF;
                overflow: scroll;
                padding: 0 20px;
                width: 440px;

                .custom-presets-list {
                    border: 2px solid $backgroundColor;
                    height: 110px;
                    list-style: none;
                    overflow: scroll;
                    padding: 0;

                    &:empty {
                        @include flexbox();
                        background: $primaryColor;
                        color: $backgroundColor;
                        align-items: center;
                        justify-content: center;

                        &::after {
                            content: attr(data-empty-message);
                        }
                    }

                    input[type="radio"] {
                        display: none;

                        &:checked + .preset-item-name {
                            background-color: #E0E0E0;
                            color: #FFF;
                            i {
                            visibility: visible;
                            }
                        }
                    }

                    .preset-item-name {
                        border-bottom: 1px solid $backgroundColor;
                        color: $primaryColor;
                        cursor: pointer;
                        height: 40px;
                        line-height: 40px;
                        margin: 0;
                        padding: 0 0 0 10px;
                        i {
                        float: right;
                        visibility: hidden;

                        }
                    }
                }

                .custom-preset-buttons {
                    height: 69px;
                    position: static;
                    justify-content: flex-end;

                    .btn-default {
                        border-radius: 0;
                        font-size: 15px;
                        height: 30px;
                        line-height: 26px;
                        min-width: 66px;
                    }
                }
            }
        }
        #ruler_unit_shower {
            top: 89px;
            right: 0px;
            padding-left: 10px;
            padding-right: 8px;
            color: #333;
            font-size: 12px;
            font-weight: 300;
        }
        #main_button,
        #tools_left,
        #tools_bottom {
            @include force-hide();
        }
        #tools_top {
            opacity: 0;
            // if display: none, text mode will break.
            // this is just a quick workaround. maybe using @include force-hide() is more beautiful.
        }
    }
    #dialog_box {
        .overlay {
            opacity: 0.1;
        }
        #dialog_container {
            color: #626262;
            border-radius: 0;
            border:none;
            background-color: #f8f8f8;
            box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
            padding: 18px;
            height: initial;
            width: 400px;
            margin-left: -200px;
            #dialog_content {
                font-size: 18px;
                margin: 0;
                margin-bottom: 10px;
                background-color: unset;
                border: none;
                height: initial;
            }
            #dialog_buttons {
                input[type=text] {
                    font-size: 16px;
                    padding-left: 10px;
                }
                input[type=button] {
                    font-size: 1.3rem;
                    padding: 6px 12px;
                    margin-top: 10px;
                    background-color: unset;
                    color: #C0C0C0;
                    border: 2px solid #C0C0C0;
                    &:hover {
                        border: 2px solid #424242;
                        color: #424242;
                    }
                    &:focus {
                        outline: 0;
                    }
                }
            }
        }
    }

    #svg_source_editor,
    #docprops,
    #svg_prefs,
    //#cmenu_canvas
    {
        @include force-hide();
    }

    #tools_top {
        z-index: 91;
    }

}
